<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('已回访电话工单')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="notice-form">
                <div class="select-list">
                    <ul>
                        <li>
                            流水号：<input type="text" name="workFormNo"/>
                        </li>
                        <li>
                            来电号码：<input type="text" name="fromTelA"/>
                        </li>
                        <li>
                            来电人：<input type="text" name="fromName"/>
                        </li>
                        <li>
                            地区名称：<input type="text" name="fmAreaName"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-primary single disabled" onclick="$.operate.editTab()">
                <i class="fa fa-edit"></i> 处理
            </a>
            <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
                <i class="fa fa-remove"></i> 删除
            </a>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/tVstRec";
    // var mInterior = ctx + 'system/mInterior';
    // var workform = ctx + 'system/workForm';
    $(function () {
        var options = {
            url: prefix + "/tel/backOverListJson",
            sortName: "pkId",
            sortOrder: "desc",
            uniqueId: "pkId",
            modalName: "已回访电话工单",
            // updateUrl: mInterior + "/cmnFile/twfDeferList/{id}",
            // updateUrl: workform + "/workFormProcess/{id}",
            updateUrl: prefix + "/tel/backRsltDeal/{id}",
            removeUrl: prefix + "/cmnFile/removetwfDeferJson",
            columns: [
                {
                checkbox: true
            },
                {
                    field: "pkId",
                    title: "工单编号",
                    visible : false
                },
                {
                    field: 'workFormNo',
                    title: '工单编号',
                    align: 'left',
                    halign: 'center',
                    sortable: true
                },
                {
                    field:'setProId',
                    title:'性质',
                    align:'center',
                    formatter:function(value,row,index){
                        return fmtWFormSort(value,row,index);
                    }
                },
                {
                    field: 'wsTopic',
                    title: '主题',
                    align: 'left',
                    halign: 'center',
                    sortable: true
                },
                {
                    field: 'fmAreaName',
                    title: '属地',
                    align: 'left',
                    halign: 'center',
                    sortable: true
                },
                {
                    field: 'fromName',
                    title: '来电人',
                    align: 'center',
                    sortable: true
                },
                {
                    field: 'fromTelA',
                    title: '来电号码',
                    align: 'center',
                    sortable: true
                },
                {
                    field: 'dfmClaName',
                    title: '诉求类别',
                    align: 'center',
                    sortable: true
                },
                {
                    field: 'openFrom',
                    title: '公开',
                    align: 'center',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return fmtWFormOpen(value, row, index);
                    }
                },
                {
                    field: 'lmtDate',
                    title: '办结日期',
                    align: 'center'
                },
                {
                    field: 'visitFlag',
                    title: '回访结果',
                    align: 'center',
                    formatter: function (value, row, index) {
                        return fmtVisitFlag(value, row, index);
                    }
                },
                {
                    field: 'backDesc',
                    title: '终结件',
                    align: 'center',
                    formatter: function (value, row, index) {
                        // return fmtState(value, row, index);
                    }
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.handleTab(\'' + row.pkId + '\')"><i class="fa fa-edit"></i>处理</a> ');
                        actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pkId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>